<%@ page contentType="text/html" pageEncoding="UTF-8"%>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
    
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<h3><spring:message code="content.menu.getTripVsDriver" text="default text" /></h3>
<form action="updateDriverOfTrip">
	
<table width="100%" border="1" cellpadding="2" cellspacing="2" align="center">
   <tr> 
    <td width="800" valign="top">
    <c:forEach var="dev" items="${trips}">
   		<p> <input type="radio" name="tripId" value="${dev.id}" >
   		<input width="50" type="text"  value="${dev.name}">
		<input width="50" type="text"  value="${dev.from}">
		<input width="50" type="text"  value="${dev.to}"  >
		<c:if test="${dev.driver != null}">
		<input type="text" name="driverName" value="${dev.driver.name}">
	</c:if> </p>
	
	</c:forEach></td>
    <td valign="top">
    <c:forEach var="driver" items="${drivers}">
	   <p> <input name="driverId" type="radio" value="${driver.id}">
		<input type="text"  value="${driver.name}">
		<input type="text"  value="${driver.surname}">
		</p>
	</c:forEach>
	</td>
   </tr>
 </table>
<input type="submit" value="<spring:message code="content.button.Save" text="default text" />">
</form>
	